import React from 'react';
import { withRouter } from 'react-router-dom';
import { PhotoSwipe } from 'weaver-mobile';

const data = [{
  url: 'https://zos.alipayobjects.com/rmsportal/PZUUCKTRIHWiZSY.jpeg',
}, {
  url: 'https://zos.alipayobjects.com/rmsportal/PZUUCKTRIHWiZSY.jpeg',
}, {
  url: 'https://zos.alipayobjects.com/rmsportal/PZUUCKTRIHWiZSY.jpeg',
}];

@withRouter
export default class FilePickerExample extends React.Component {

  componentDidMount() {
    window.alert(window.navigator.userAgent);
  }

  render() {
    return (
      <div>
        {
          data.map((d, i) => <img style={{ width: 100, height: 100 }} src={d.url} onClick={() => PhotoSwipe.showImage(data, i)} />)
        }
      </div>
    );
  }
}


